let thread = require('./modules/thread');

let work = thread.runWorker("./thread_work.js", 1, data=>{
    console.log("main recv: "+data);
}, err=>{
    console.log(err);
});
let work2 = thread.runWorker("./thread_work.js", 2, data=>{
    console.log("main recv: "+data);
});
work.postMessage(10);
work.close();
work.postMessage(99);
work2.postMessage(11);